Integrand size = 20, antiderivative size = 402 \[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=-\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {15 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {30 a b \sqrt {x} \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {15 i a b \operatorname {PolyLog}\left (6,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d} \]
[Out]
Time = 0.70 (sec) , antiderivative size = 402, normalized size of antiderivative = 1.00, number of steps used = 20, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3832, 3803, 3800, 2221, 2611, 6744, 2320, 6724, 3801, 30} \[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {a^2 x^3}{3}+\frac {15 i a b \operatorname {PolyLog}\left (6,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {30 a b \sqrt {x} \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {2}{3} i a b x^3-\frac {15 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {2 i b^2 x^{5/2}}{d}-\frac {b^2 x^3}{3} \]
[In]
[Out]
Rule 30
Rule 2221
Rule 2320
Rule 2611
Rule 3800
Rule 3801
Rule 3803
Rule 3832
Rule 6724
Rule 6744
Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int x^5 (a+b \tan (c+d x))^2 \, dx,x,\sqrt {x}\right ) \\ & = 2 \text {Subst}\left (\int \left (a^2 x^5+2 a b x^5 \tan (c+d x)+b^2 x^5 \tan ^2(c+d x)\right ) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a^2 x^3}{3}+(4 a b) \text {Subst}\left (\int x^5 \tan (c+d x) \, dx,x,\sqrt {x}\right )+\left (2 b^2\right ) \text {Subst}\left (\int x^5 \tan ^2(c+d x) \, dx,x,\sqrt {x}\right ) \\ & = \frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}-(8 i a b) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x^5}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )-\left (2 b^2\right ) \text {Subst}\left (\int x^5 \, dx,x,\sqrt {x}\right )-\frac {\left (10 b^2\right ) \text {Subst}\left (\int x^4 \tan (c+d x) \, dx,x,\sqrt {x}\right )}{d} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(20 a b) \text {Subst}\left (\int x^4 \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d}+\frac {\left (20 i b^2\right ) \text {Subst}\left (\int \frac {e^{2 i (c+d x)} x^4}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )}{d} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {(40 i a b) \text {Subst}\left (\int x^3 \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2}-\frac {\left (40 b^2\right ) \text {Subst}\left (\int x^3 \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(60 a b) \text {Subst}\left (\int x^2 \operatorname {PolyLog}\left (3,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3}+\frac {\left (60 i b^2\right ) \text {Subst}\left (\int x^2 \operatorname {PolyLog}\left (2,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(60 i a b) \text {Subst}\left (\int x \operatorname {PolyLog}\left (4,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^4}-\frac {\left (60 b^2\right ) \text {Subst}\left (\int x \operatorname {PolyLog}\left (3,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^4} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {30 a b \sqrt {x} \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}-\frac {(30 a b) \text {Subst}\left (\int \operatorname {PolyLog}\left (5,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^5}-\frac {\left (30 i b^2\right ) \text {Subst}\left (\int \operatorname {PolyLog}\left (4,-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^5} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}+\frac {30 a b \sqrt {x} \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d}+\frac {(15 i a b) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(5,-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}-\frac {\left (15 b^2\right ) \text {Subst}\left (\int \frac {\operatorname {PolyLog}(4,-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6} \\ & = -\frac {2 i b^2 x^{5/2}}{d}+\frac {a^2 x^3}{3}+\frac {2}{3} i a b x^3-\frac {b^2 x^3}{3}+\frac {10 b^2 x^2 \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {4 a b x^{5/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}-\frac {20 i b^2 x^{3/2} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {10 i a b x^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}+\frac {30 b^2 x \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {20 a b x^{3/2} \operatorname {PolyLog}\left (3,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {30 i b^2 \sqrt {x} \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}-\frac {30 i a b x \operatorname {PolyLog}\left (4,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^4}-\frac {15 b^2 \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {30 a b \sqrt {x} \operatorname {PolyLog}\left (5,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^5}+\frac {15 i a b \operatorname {PolyLog}\left (6,-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^6}+\frac {2 b^2 x^{5/2} \tan \left (c+d \sqrt {x}\right )}{d} \\ \end{align*}
Time = 3.81 (sec) , antiderivative size = 567, normalized size of antiderivative = 1.41 \[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\frac {1}{3} \left (-\frac {i b e^{2 i c} \left (-12 b d^5 e^{-2 i c} x^{5/2}+4 a d^6 e^{-2 i c} x^3+30 i b d^4 e^{-2 i c} \left (1+e^{2 i c}\right ) x^2 \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )-12 i a d^5 e^{-2 i c} \left (1+e^{2 i c}\right ) x^{5/2} \log \left (1+e^{-2 i \left (c+d \sqrt {x}\right )}\right )-60 b d^3 \left (1+e^{-2 i c}\right ) x^{3/2} \operatorname {PolyLog}\left (2,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+30 a d^4 \left (1+e^{-2 i c}\right ) x^2 \operatorname {PolyLog}\left (2,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+90 i b d^2 e^{-2 i c} \left (1+e^{2 i c}\right ) x \operatorname {PolyLog}\left (3,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )-60 i a d^3 e^{-2 i c} \left (1+e^{2 i c}\right ) x^{3/2} \operatorname {PolyLog}\left (3,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+90 b d \left (1+e^{-2 i c}\right ) \sqrt {x} \operatorname {PolyLog}\left (4,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )-90 a d^2 \left (1+e^{-2 i c}\right ) x \operatorname {PolyLog}\left (4,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )-45 i b e^{-2 i c} \left (1+e^{2 i c}\right ) \operatorname {PolyLog}\left (5,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+90 i a d e^{-2 i c} \left (1+e^{2 i c}\right ) \sqrt {x} \operatorname {PolyLog}\left (5,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )+45 a \left (1+e^{-2 i c}\right ) \operatorname {PolyLog}\left (6,-e^{-2 i \left (c+d \sqrt {x}\right )}\right )\right )}{d^6 \left (1+e^{2 i c}\right )}+\frac {6 b^2 x^{5/2} \sec (c) \sec \left (c+d \sqrt {x}\right ) \sin \left (d \sqrt {x}\right )}{d}+x^3 \left (a^2-b^2+2 a b \tan (c)\right )\right ) \]
[In]
[Out]
\[\int x^{2} \left (a +b \tan \left (c +d \sqrt {x}\right )\right )^{2}d x\]
[In]
[Out]
\[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )}^{2} x^{2} \,d x } \]
[In]
[Out]
\[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x^{2} \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )^{2}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 2421 vs. \(2 (320) = 640\).
Time = 0.60 (sec) , antiderivative size = 2421, normalized size of antiderivative = 6.02 \[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int { {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )}^{2} x^{2} \,d x } \]
[In]
[Out]
Timed out. \[ \int x^2 \left (a+b \tan \left (c+d \sqrt {x}\right )\right )^2 \, dx=\int x^2\,{\left (a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )\right )}^2 \,d x \]
[In]
[Out]